1. Field of the Invention
The present invention relates to systems and methods for wear leveling an electrically erasable and programmable read only memory (EEPROM).
2. Background of the Related Art
In general, computer systems use a hard disk as a long term memory device. However, hard disk devices are heavy, bulky and cannot withstand physical impacts due to mechanical characteristics of the devices. Therefore, much care is required to use a hard disk in a portable system such as a notebook computer.
Recently, use of an EEPROM, also known as a flash memory, which has good durability and large memory capacity has become more common. In some applications, flash memory are replacing electromechanical hard disks.
A flash memory comprises a plurality of unit memory cells, each of which has one or more MOS transistors. Each transistor has two gates, a floating gate and a control gate. The floating gate is typically covered with an oxide film (SiO.sub.2), and the floating gate is located between a substrate and a control gate. The transistor can switch between two logic states by implanting or erasing electric charges into or from the floating gate. That is, when a relatively high voltage is applied to the control gate to generate a strong electric field between the control gate and substrate, electrons are moved from the substrate to the floating gate. If the voltage supply to the control gate is stopped, the electric charges on the floating gate do not escape from the floating gate to the external due to the oxide film, thereby storing data.
The more times data is written to and erased from a flash memory cell, the more degraded the transistor of the memory cell will become due to the high voltages applied to the transistor. After a large number of data storage and erasing operations, the data storage function fails to be satisfactorily carried out.
One difference between a flash memory and a general EEPROM is that in a flash memory, data is erased by block unit. A flash memory cell array typically comprises a plurality of unit sectors, where each unit sector has a data storage capacity of a few hundred bytes. When writing data, it is possible for only a part of the memory cells of a unit sector to be used. On the other hand, when the data is erased, a whole unit sector is erased, regardless of whether particular memory cells of the unit sector are storing data That is, data is erased by unit sector.
Since flash memory cells are degraded during the process of writing and erasing data, the memory cells must be checked to determine if a sector may be used before data is written to the sector. If the sector has degraded too much, the data is written to a different, less degraded sector. This process is called wear leveling.
FIG. 1 is a block diagram showing a controller and memory cell array of a background art flash memory. The memory cell array 30 comprises a plurality of unit sectors and a sector information table. The unit sectors store data, and the sector information table stores information on each unit sector, including the physical address corresponding to a logical address, and the number of time each sector has been erased.
The address converter 21 within the controller 20 converts a logical address generated in a host 10 (typically a microprocessor) to the corresponding physical address, and then reads data from or writes data to the corresponding sector. The controller 20 controls data writing/erasing operations of the memory cell array 30, and periodically rearranges relationships between logical addresses and physical addresses by remapping the memory cell array when a unit sector becomes too degraded.
A comparator 22 for comparing the number of erasing times a sector has been erased is another element of the controller 20. The comparator 22 has a value, obtained by testing, which represents an initial reference number of erasing times. The testing is performed to determine the maximum number of data writing and erasing operations that can be performed, based on operational characteristics of the unit memory cell, before a cell becomes too degraded. The comparator 22 compares the reference number of erasing times to the actual number of times each unit sector has been erased using the information stored in the sector information table of the memory cell array 30. If the two numbers are identical for a sector, the memory cell array is re-mapped so that the degraded cell is not used to store data.
FIG. 2 shows a unit sector of a background art memory cell array. The unit sector is divided into an overhead area and a user's area. The user's area is a simple data storage area 32 and the overhead area comprises a miscellaneous information area 33 and an erasing tracking area 34 for storing the number of times the sector has been erased. The miscellaneous information storage area 33 stores various information regarding the sectors, including the physical address, valid bits and dirty bits.
If a sector of a flash memory has a data storing capacity of 512 bytes, and the full data storing capacity of the flash memory array is 2 gigabytes, the unit sectors must be capable of storing more than 2 gigabytes of data. This is because each sector of the flash memory cell array must track data in an overhead area Therefore, for any given capacity flash memory, the overhead area of the flash memory array increases the data storage requirements of the device. A significant portion of this additional data storage requirement is due to the portion of the overhead area used to track the number of times each sector has been erased.
Due to errors that can occur during the manufacturing process, unit memory cells may fail to have uniform characteristics. For this reason, a particular memory cell may degrade more rapidly than other memory cells for the same number of data erasing operations. In this case, a part of a sector may be degraded, and fail to store data, even if the number of erasing times of the unit sector has not reached the reference number of erasing times obtained by testing. As a result, the data storing capacity of the whole sector is not reliable.